
import React, { Component } from 'react';

class Child extends Component {
    handClick(){
        // this.props.title = 'state';//props是只读的
    }
    render() {
        return (
            <div className='child'>
                {this.props.title} {this.props.count}
                <button onClick={()=>{this.handClick()}}>更改</button>
                
            </div>
        );
    }
}

export default Child;